home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Devices / CD-ROM / iso9660 / Srcs / DialogUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-28  |  1.3 KB  |  40 lines  |  [TEXT/MPS ]

  1. /*
  2. from engber@gumball.ils.nwu.edu (Mike Engber):
  3.  
  4. Thanks for all the replys to my centering DLOG/ALRT question. I used the
  5. best ideas to synthesize my solution which I think elegant enough to be
  6. worth sharing. Attached are the relevant portions of my .h & .c files.
  7.  
  8. A couple of notes:
  9.  
  10. Several people`s solutions burned in the rsrc ids of the standard
  11. file dialogs. You may want to note that there are named constants for
  12. these values: putDlgID  & getDlgID.
  13.  
  14. All the solutions I was sent used screenBits.bounds. Is this what you
  15. want in a multi-monitor situation? If not, what should you do?
  16.  
  17. Feel free to use/modify/comment-on this code, especially if you notice
  18. any bugs or questionable practices.
  19.  
  20. -ME
  21. */
  22.  
  23. /* DialogUtils.h */
  24.  
  25. /* Return topLeft point to center standard file dialogs. */
  26. extern Point DU_StdPutWhere(void);
  27. extern Point DU_StdGetWhere(void);
  28.  
  29. /*
  30.  * Pre-load and center ALRT/DLOG template resources. Changes do not affect
  31.  *  the resource file, but if the ALRT/DLOG is created soon after the call
  32.  *  it will use the modified (centered) template in memory. Both routines
  33.  *  return the passed rsrc id to allow calls like:
  34.  *      Alert(DU_CenterALRT(alertID),filter);
  35.  *      GetNewDialog(DU_CenterDLOG(dlogID),dStorage,behindWindow);
  36.  */
  37. extern short DU_CenterALRT(short rsrcId);
  38. extern short DU_CenterDLOG(short rsrcId);
  39.  
  40.